package line;
//import force.Force;
import point.ObjectPoint;
import environment.Simulation;
/**
 * 
 * @author Mechael Deng(mjd24), Xi Du (xd14)
 *
 */
public class Bar extends Line {

    ///**
    // * angle between two point.
    // */
    //   private double angle = Force.angleBetween(
    //            getmyStart().getCenter(), getmyEnd().getCenter());

    /**
     * 
     * @param start start point
     * @param end end point
     * @param length rest length
     * @param kVal k factor
     */
    public Bar(final ObjectPoint start, final ObjectPoint end,
            final double length, final double kVal) {
        super(start, end, length, kVal);

    }
    /**
     * implement the update method.
     * @param canvas container
     * @param dt time
     */
    public final void update(final Simulation canvas, final double dt) {
        applyHookesForce(getmyK(), getDistance());
    }
}
